package models

import "gorm.io/gorm"

type Shop struct {
	gorm.Model
	Phone    string `json:"Phone"`
	Password string `json:"Password"`
	Title    string `json:"Title"`
}

func (s *Shop) ShopAddBy(db *gorm.DB) error {

	return db.Debug().Create(s).Error

}

func (s *Shop) FindShopAdd(db *gorm.DB, phone string) error {

	return db.Debug().Where("phone=?", phone).Find(s).Error

}

func (s *Shop) ShopFind(db *gorm.DB) error {

	return db.Debug().Find(s).Error

}
